package com.hs.telepass.utils;


import android.content.Context;
import com.hs.teleform.R;
import com.hs.telepass.controller.TaskController;

public class ErrorCodeHandleUtil {
    public static void handleErrorCode(Context context, int errorCode){
        switch (errorCode){
            case TaskController.ERROR_CODE_NO_NET:
                ToastUtil.showMessageInShort(context, R.string.error_net_unavailable);
                break;
            case TaskController.ERROR_CODE_SERVER_NOT_FOUND:
                ToastUtil.showMessageInShort(context, R.string.error_server_not_found);
                break;
            case TaskController.ERROR_CODE_TIMEOUT:
                //ToastUtil.showMessageInShort(context, R.string.error_timeout);
                break;
            case TaskController.ERROR_CODE_NO_UNKNOWN:
                ToastUtil.showMessageInShort(context, R.string.error_unknow);
                break;
        }
    }
}
